﻿using System.Collections.Generic;

namespace DomainModel
{
    public class Subgroup : EntityBase
    {
        private readonly List<User> _students;

        public virtual Group Group { get; set; }
        public virtual int GroupNo { get; set; }
        public virtual IEnumerable<User> Students
        {
            get { return _students; }
        }

        protected Subgroup()
        {
            _students = new List<User>();
        }

        public Subgroup(Group group, int groupNo)
            : this()
        {
            this.Group = group;
            GroupNo = groupNo;
        }
    }
}
